<?php if (isset($redirect)) echo $javascript->codeBlock('window.location = "/assessments/"'); ?>
<div id="aForm">
<?php 
	echo $ajax->form(array('type' => 'post',
		'options' => array(
			'model'=>'Assessment',
			'update'=>'edit_div_'.$assessment['Assessment']['id'],
			'url' => array(
				'controller' => 'assessments',
				'action' => 'edit'
			),
		)
	));
	?>
<div id="aFormLeft">
	<?php echo $form->hidden('id');?>
	<?php echo $form->input('name');?>
	<?php echo $form->input('assessment_password');?>
</div>
<div id="aFormRight">
	<?php echo $form->input('Course');?>
	<?php echo $form->input('learning_objective');?>
</div>
<div id="aFormRight">
	<?php echo $form->submit('Update Assessment'); ?>
	<?php echo $form->end(); ?>
	<?php
		$assessment_link = $ajax->link
		(
			'Back',
			array( 'controller' => 'questiongroups', 'action' => 'ajax_get', $assessment['Assessment']['id'] ),
			array( 'update' => 'edit_div_'.$assessment['Assessment']['id'], 'indicator' => 'loading')
		);
		
		echo $assessment_link;
	?>
</div>
</div>

